home *** CD-ROM | disk | FTP | other *** search
- global gKeyOn, gGameMode, gLoaded, gLevel, gLevelMax, gScore, gSkillMode, gLevelFour, gGameList, gGameName, gGameID, gMenuCalled, gGameType, gClickedArrow, _DEBUG, gBuyURL, gBuyURLNum, gBuyURLaid, gMoreURL
-
- on prepareMovie
- gLoaded = 0
- set the keyDownScript to "keyDownCheck"
- gKeyOn = #none
- gClickedArrow = 0
- gBuyURL = []
- gBuyURL.add("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=nik@catalystpics.co.uk¤cy=USD&item_name=PipeDown&item_number=Catalyst&amount=9.95")
- gBuyURL.add("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=nik@catalystpics.co.uk¤cy=USD&item_name=PipeDown&item_number=TinyArcade&amount=9.95")
- gBuyURL.add("http://www.miniclip.com/buy_pipedown.htm")
- gBuyURL.add("http://www.arcadetown.com/order/choosemethod.asp?gameid=pipedown")
- gMoreURL = []
- gMoreURL.add("http://www.catalystpics.co.uk/games.html")
- gMoreURL.add("http://www.catalystpics.co.uk/games.html")
- gMoreURL.add("http://www.miniclip.com")
- gMoreURL.add("http://www.arcadetown.com/index.asp?gameid=pipedown&aid=")
- _DEBUG = 0
- end
-
- on startMovie
- if _DEBUG then
- screenSize = 1
- gGameType = "demo"
- gBuyURLNum = 1
- else
- gGameType = "none"
- checkCount = 900000
- repeat while (gGameType = "none") and (checkCount > 0)
- paramCount = externalParamCount()
- if paramCount > 1 then
- repeat with n = 1 to paramCount
- tName = externalParamName(n)
- if tName = "sw3" then
- gGameType = externalParamValue(n)
- end if
- end repeat
- end if
- checkCount = checkCount - 1
- end repeat
- if checkCount <= 0 then
- gGameType = "web"
- end if
- if gGameType = "4ul5er510n" then
- gGameType = "full"
- end if
- if gGameType = "web" then
- screenSize = 1
- else
- screenSize = "none"
- checkCount = 900000
- repeat while (screenSize = "none") and (checkCount > 0)
- paramCount = externalParamCount()
- if paramCount > 1 then
- repeat with n = 1 to paramCount
- tName = externalParamName(n)
- if tName = "sw4" then
- screenSize = externalParamValue(n)
- end if
- end repeat
- end if
- checkCount = checkCount - 1
- end repeat
- if checkCount <= 0 then
- screenSize = 1
- end if
- end if
- if gGameType <> "full" then
- gBuyURLNum = "none"
- checkCount = 900000
- repeat while (gBuyURLNum = "none") and (checkCount > 0)
- paramCount = externalParamCount()
- if paramCount > 1 then
- repeat with n = 1 to paramCount
- tName = externalParamName(n)
- if tName = "sw2" then
- gBuyURLNum = externalParamValue(n)
- end if
- end repeat
- end if
- checkCount = checkCount - 1
- end repeat
- if checkCount <= 0 then
- gBuyURLNum = 1
- end if
- end if
- gBuyURLNum = value(gBuyURLNum)
- if (gBuyURLNum = 4) and (gGameType = "web") then
- gBuyURLaid = "none"
- checkCount = 100000
- repeat while (gBuyURLaid = "none") and (checkCount > 0)
- paramCount = externalParamCount()
- if paramCount > 1 then
- repeat with n = 1 to paramCount
- tName = externalParamName(n)
- if tName = "sw5" then
- gBuyURLaid = externalParamValue(n)
- end if
- end repeat
- end if
- checkCount = checkCount - 1
- end repeat
- if gBuyURLaid <> "none" then
- gBuyURL[4] = gBuyURL[4] & "&aid=" & gBuyURLaid
- gMoreURL[4] = gMoreURL[4] & gBuyURLaid
- end if
- end if
- end if
- setVariable(sprite(1), "gameType", gGameType)
- setVariable(sprite(1), "screenSize", string(screenSize))
- if gGameType <> "full" then
- gLevelMax = 6
- else
- gLevelMax = 50
- end if
- put gGameType, screenSize, gBuyURLNum
- end
-
- on newGame
- gSkillMode = value(getVariable(sprite(1), "skillMode"))
- gLevel = value(getVariable(sprite(1), "level"))
- if gLevel = 0 then
- gLevel = 1
- end if
- if _DEBUG then
- gLevel = 1
- end if
- gScore = 0
- gMenuCalled = 0
- go("newlevel")
- end
-
- on newLevel
- go("newlevel")
- end
-
- on gotoMenu
- gMenuCalled = 1
- gGameMode = #finish
- end
-
- on getSaved
- modeList = ["speed", "puzzle", "genius"]
- gGameList = []
- gameList = "none"
- if _DEBUG then
- gameList = "Paul_Barnes #?!!# Speed_play_game_1 Caroline PJP 1 2 3 1 2"
- end if
- externalEvent("getSaved")
- repeat while gameList = "none"
- paramCount = externalParamCount()
- if paramCount > 1 then
- repeat with n = 1 to paramCount
- tName = externalParamName(n)
- if tName = "sw7" then
- gameList = externalParamValue(n)
- end if
- end repeat
- end if
- end repeat
- gameCount = integer(the number of words in gameList * 0.5)
- put "count = " & gameCount
- repeat with i = 1 to gameCount * 2
- if i <= gameCount then
- n = gameList.word[i]
- gname = EMPTY
- repeat with j = 1 to n.length
- if n.char[j] = "_" then
- gname = gname & " "
- next repeat
- end if
- gname = gname & n.char[j]
- end repeat
- if gname = "#?!!#" then
- gGameList[i] = "<empty>"
- else
- gGameList[i] = gname
- end if
- setVariable(sprite(1), "gameName" & i, gGameList[i])
- next repeat
- end if
- mn = value(gameList.word[i])
- if mn > 0 then
- setVariable(sprite(1), "gameMode" & i - gameCount, modeList[mn])
- next repeat
- end if
- setVariable(sprite(1), "gameMode" & i - gameCount, EMPTY)
- end repeat
- end
-
- on saveGame
- id = getVariable(sprite(1), "gameID")
- gnameF = getVariable(sprite(1), "gameName")
- wc = the number of words in gnameF
- if wc > 1 then
- gname = EMPTY
- repeat with i = 1 to wc
- gname = gname & gnameF.word[i]
- if i < wc then
- gname = gname & "_"
- end if
- end repeat
- else
- gname = gnameF
- end if
- txt = "saveGame(" & id & "," & gname & "," & gScore & "," & gLevel & "," & gSkillMode & ")"
- externalEvent(txt)
- setVariable(sprite(1), "saveInfo", "game saved successfully")
- end
-
- on loadGame
- id = getVariable(sprite(1), "gameID")
- gGameID = value(id)
- externalEvent("setGame(" & id & ")")
- gLevel = 0
- repeat while gLevel = 0
- paramCount = externalParamCount()
- if paramCount > 1 then
- repeat with n = 1 to paramCount
- tName = externalParamName(n)
- if tName = "sw6" then
- gSkillMode = externalParamValue(n)
- end if
- if tName = "sw8" then
- gScore = externalParamValue(n)
- end if
- if tName = "sw9" then
- gLevel = externalParamValue(n)
- end if
- end repeat
- end if
- end repeat
- gLevel = value(gLevel)
- gScore = value(gScore)
- gSkillMode = value(gSkillMode)
- go("newlevel")
- end
-
- on soundFX fxMember, fxChannel, fxVol
- sound(fxChannel).volume = fxVol
- sound(fxChannel).play(member(fxMember))
- end
-
- on drop
- if gGameMode <> #drop then
- gGameMode = #dropbutton
- end if
- end
-
- on moveFlash flabel
- setVariable(sprite(1), "frameLabel", string(flabel))
- sprite(1).tellTarget("frameSkip")
- sprite(1).frame = 2
- sprite(1).endTellTarget()
- end
-
- on flashSFX
- sprite(1).tellTarget("sfx")
- sprite(1).frame = 2
- sprite(1).endTellTarget()
- end
-
- on GetUrl
- nURL = getVariable(sprite(1), "url")
- if nURL = "buy" then
- nURL = gBuyURL[gBuyURLNum]
- else
- if nURL = "moregames" then
- nURL = gMoreURL[gBuyURLNum]
- end if
- end if
- if gGameType = "web" then
- gotoNetPage(nURL, "_blank")
- else
- externalEvent("getURL(" & nURL & ")")
- end if
- end
-
- on quitGame
- externalEvent("quit")
- end
-
- on startIns
- go("ins")
- end
-
- on cursor28
- gGameMode = #cursor28
- end
-
- on fullScreenRes
- gSize = getVariable(sprite(1), "screenSize")
- sz = "fullScreenRes(" & gSize & ")"
- externalEvent(sz)
- end
-
- on sizeWindow
- gSize = value(getVariable(sprite(1), "screenSize"))
- if gSize > 0 then
- externalEvent("resize")
- end if
- end
-
- on hint
- hintState = getVariable(sprite(1), "hintState")
- if hintState = "ON" then
- gGameMode = #hint
- else
- gGameMode = #hintend
- end if
- end
-
- on reset
- gGameMode = #reset
- end
-
- on keyDownCheck
- put the keyCode
- end
-